<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Fetch the SNMP object which follows the given object id</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.snmp3-get.html">« snmp3_get</a></li>
      <li style="float: right;"><a href="function.snmp3-real-walk.html">snmp3_real_walk »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.snmp.html">SNMP 函数</a></li>
    <li>Fetch the SNMP object which follows the given object id</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.snmp3-getnext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">snmp3_getnext</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">snmp3_getnext</span> &mdash; <span class="dc-title">Fetch the <abbr title="Simple Network Management Protocol">SNMP</abbr> object which follows the given object id</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.snmp3-getnext-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>snmp3_getnext</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$hostname</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$security_name</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$security_level</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$auth_protocol</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$auth_passphrase</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$privacy_protocol</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$privacy_passphrase</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type">array</span>|<span class="type">string</span></span> <code class="parameter">$object_id</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code><span class="initializer"> = -1</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$retries</code><span class="initializer"> = -1</span></span><br>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>snmp3_getnext()</strong></span> function is used to read the
   value of the <abbr title="Simple Network Management Protocol">SNMP</abbr> object that follows the specified
   <code class="parameter">object_id</code>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.snmp3-getnext-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">hostname</code></dt>

    <dd>

     <p class="para">
      The hostname of the
      <abbr title="Simple Network Management Protocol">SNMP</abbr> agent (server).
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">security_name</code></dt>

    <dd>

     <p class="para">
      the security name, usually some kind of username
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">security_level</code></dt>

    <dd>

     <p class="para">
      the security level (noAuthNoPriv|authNoPriv|authPriv)
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">auth_protocol</code></dt>

    <dd>

     <p class="para">
      the authentication protocol (<code class="literal">&quot;MD5&quot;</code>, <code class="literal">&quot;SHA&quot;</code>,
      <code class="literal">&quot;SHA256&quot;</code>, or <code class="literal">&quot;SHA512&quot;</code>)
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">auth_passphrase</code></dt>

    <dd>

     <p class="para">
      the authentication pass phrase
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">privacy_protocol</code></dt>

    <dd>

     <p class="para">
      the privacy protocol (DES or AES)
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">privacy_passphrase</code></dt>

    <dd>

     <p class="para">
      the privacy pass phrase
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">object_id</code></dt>

    <dd>

     <p class="para">
      The <abbr title="Simple Network Management Protocol">SNMP</abbr> object id.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">timeout</code></dt>

    <dd>

     <p class="para">
      The number of microseconds until the first timeout.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">retries</code></dt>

    <dd>

     <p class="para">
      The number of times to retry if timeouts occur.
     </p>
    </dd>

   
  </dl>

 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.snmp3-getnext-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <abbr title="Simple Network Management Protocol">SNMP</abbr> object value on success or <strong><code>false</code></strong> on error.
   In case of an error, an E_WARNING message is shown.
  </p>
 </div>

 
 <div class="refsect1 changelog" id="refsect1-function.snmp3-getnext-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.1.0</td>
       <td>
        The <code class="parameter">auth_protocol</code> now accepts <code class="literal">&quot;SHA256&quot;</code>
        and <code class="literal">&quot;SHA512&quot;</code> when supported by libnetsnmp.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.snmp3-getnext-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-4471">
    <p><strong>示例 #1 Using <span class="function"><strong>snmp3_getnext()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$nameOfSecondInterface&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">snmp3_getnext</span><span style="color: #007700">(</span><span style="color: #DD0000">'localhost'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'james'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'authPriv'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'SHA'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'secret007'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'AES'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'secret007'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'IF-MIB::ifName.1'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.snmp3-getnext-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.snmp3-get.html" class="function" rel="rdfs-seeAlso">snmp3_get()</a> - Fetch an SNMP object</span></li>
    <li class="member"><span class="function"><a href="function.snmp3-walk.html" class="function" rel="rdfs-seeAlso">snmp3_walk()</a> - Fetch all the SNMP objects from an agent</span></li>
   </ul>
  </p>
 </div>

 
</div></div></div></body></html>